package com.kjlink.widget.oa.model;

/**
 * 描述:
 *
 * @author Vic.xu
 * @since 2025-09-01 10:26
 */

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 项目实体类，与接口返回的JSON结构对应
 */
@JsonIgnoreProperties(ignoreUnknown = true) // 忽略JSON中不存在的字段
@Getter
@Setter
public class OAProject {

    /**
     * 项目编号
     */
    @JsonProperty("no")
    private String projectNo;

    /**
     * 项目名称
     */
    @JsonProperty("name")
    private String projectName;

    /**
     * 客户名称
     */
    @JsonProperty("custName")
    private String customerName;

    /**
     * 用户编码集合
     */
    @JsonProperty("userCodeSet")
    private List<String> userCodeList;

    /**
     * 项目状态
     */
    @JsonProperty("projectState")
    private String projectStatus;

    /**
     * 项目地点
     */
    @JsonProperty("location")
    private String projectLocation;

    /**
     * // 项目开始日期
     * pattern: 匹配JSON中的日期格式
     * timezone: 指定时区，避免解析时出现时差问题
     */
    @JsonProperty("startDate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startDate;

    /**
     * 项目结束日期
     */
    @JsonProperty("endDate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endDate;

    /**
     * 审批日期
     */
    @JsonProperty("approvalDate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date approvalDate;

    /**
     * 审批人编码
     */
    @JsonProperty("approvalUserCode")
    private String approvalUserCode;

    /**
     * 公司电话
     */
    @JsonProperty("comTel")
    private String companyTel;

    /**
     * 金额字段使用BigDecimal避免精度丢失
     */
    @JsonProperty("amount")
    private BigDecimal projectAmount;

    /**
     * 项目阶段
     */
    @JsonProperty("stage")
    private String projectStage;

    /**
     * 客户经理编码
     */
    @JsonProperty("aeCode")
    private String aeCode;

    /**
     * account manager编码
     */
    @JsonProperty("amCode")
    private String amCode;

    /**
     * 产品工程师编码
     */
    @JsonProperty("peCode")
    private String peCode;

    /**
     * 项目经理编码
     */
    @JsonProperty("pmCode")
    private String pmCode;

    public String getProjectNo() {
        return projectNo;
    }

    public void setProjectNo(String projectNo) {
        this.projectNo = projectNo;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public List<String> getUserCodeList() {
        return userCodeList;
    }

    public void setUserCodeList(List<String> userCodeList) {
        this.userCodeList = userCodeList;
    }

    public String getProjectStatus() {
        return projectStatus;
    }

    public void setProjectStatus(String projectStatus) {
        this.projectStatus = projectStatus;
    }

    public String getProjectLocation() {
        return projectLocation;
    }

    public void setProjectLocation(String projectLocation) {
        this.projectLocation = projectLocation;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Date getApprovalDate() {
        return approvalDate;
    }

    public void setApprovalDate(Date approvalDate) {
        this.approvalDate = approvalDate;
    }

    public String getApprovalUserCode() {
        return approvalUserCode;
    }

    public void setApprovalUserCode(String approvalUserCode) {
        this.approvalUserCode = approvalUserCode;
    }

    public String getCompanyTel() {
        return companyTel;
    }

    public void setCompanyTel(String companyTel) {
        this.companyTel = companyTel;
    }

    public BigDecimal getProjectAmount() {
        return projectAmount;
    }

    public void setProjectAmount(BigDecimal projectAmount) {
        this.projectAmount = projectAmount;
    }

    public String getProjectStage() {
        return projectStage;
    }

    public void setProjectStage(String projectStage) {
        this.projectStage = projectStage;
    }

    public String getAeCode() {
        return aeCode;
    }

    public void setAeCode(String aeCode) {
        this.aeCode = aeCode;
    }

    public String getAmCode() {
        return amCode;
    }

    public void setAmCode(String amCode) {
        this.amCode = amCode;
    }

    public String getPeCode() {
        return peCode;
    }

    public void setPeCode(String peCode) {
        this.peCode = peCode;
    }

    public String getPmCode() {
        return pmCode;
    }

    public void setPmCode(String pmCode) {
        this.pmCode = pmCode;
    }
}
